<%@ page language="java" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html lang="zh-cn">
<head>
<title>登录</title>
<base href="${base}/manager/" />
<link rel="stylesheet" href="css/pintuer.css">
<link rel="stylesheet" href="css/admin.css">
</head>
<script src="js/jquery-3.5.0.js"></script>
<script src="layer/layer.js"></script>
<script>
	let error = "${error}";
	if(error!=""){
		layer.alert(error);
	}
	let nologin = "${nologin}";
	if(nologin!=""){
		layer.msg(nologin);
	}
	window.addEventListener("load",function(){
		let imgcaptcha = document.getElementById("imgcaptcha");
			imgcaptcha.addEventListener("click",function(){
			imgcaptcha.src="captcha?z="+new Date().getTime();
		})
		
		let tips = document.getElementById("errortip");
			if(tips.textContent!=""){
				tips.style.color="red";
				setTimeout(function(){
					tips.innerText="";
				},"5000")
			}
	})
</script>
<body>
	<div class="bg"></div>
	<div class="container">
		<div class="line bouncein">
			<div class="xs6 xm4 xs3-move xm4-move">
				<div style="height:150px;"></div>
				<div class="media media-y margin-big-bottom"></div>
				<form action="Adminservlet" method="post">
					<input type="hidden" name="opr" value="login" />
					<div class="panel loginbox">
						<div class="text-center margin-big padding-big-top">
							<h1>后台管理中心</h1>
						</div>
						<div class="panel-body"
							style="padding:30px; padding-bottom:10px; padding-top:10px;">
							<div class="form-group">
								<div class="field field-icon-right">
									<input type="text" class="input input-big" name="account"
										placeholder="登录账号" value="${cookie.act.value}"/> <span
										class="icon icon-user margin-small"></span>
								</div>
							</div>
							<div class="form-group">
								<div class="field field-icon-right">
									<input type="password" class="input input-big" name="password"
										placeholder="登录密码" value="${cookie.pwd.value}" /> <span
										class="icon icon-key margin-small"></span>
								</div>
							</div>
							<div class="form-group">
								<div class="field">
									<input type="text" class="input input-big" name="code"
										placeholder="填写右侧的验证码" /> <img src="captcha"
										alt="" width="100" height="32" class="passcode"
										style="height:43px;cursor:pointer;" id="imgcaptcha">

								</div>
							</div>
							<div class="tips" id="errortip">${msg}</div>
							<div class="tips"><input type="checkbox" name="isRemember" value="1">记住我?<select name="time">
								<option value="1">1分钟</option>
								<option value="2">1小时</option>
							</select></div>
							
						</div>
						<div style="float:right;margin-top:-30px;margin-right:30px" class="tips">
							<input type="checkbox" name="autologin" value="yes">自动登录
						</div>
						<div style="padding:30px;">
							<input type="submit"
								class="button button-block bg-main text-big input-big"
								value="登录">
						</div>
					</div>
				</form>
			</div>
		</div>
	</div>
</body>
</html>